/*
@authors - Siddharth Sathyam, Pat LaMontagna, Alan Ruvalcaba
@Description - Chat Window GUI Code Header
**/

#ifndef IM_WINDOW_H
#define IM_WINDOW_H

#include <QMainWindow>
#include <QTime>
#include <QTcpSocket>

namespace Ui {
    class im_window;
}

class im_window : public QMainWindow{
    Q_OBJECT

private:
    void updateUsersList(QStringList list);
    Ui::im_window *ui;
    QTcpSocket *mainSoc;
    QString clientUserName;

public:
    im_window(QWidget *parent = 0);
    void setSocket(QTcpSocket*);
    void setUserName(QString name);
    ~im_window();

private slots:
    void on_sendButton_clicked();
    void readyRead();
    void sendMessage(QString fromUsername, QString toUsername, QString message, QString timeSent);
};

#endif // IM_WINDOW_H
